<?php
	$css_list[0]['url'][] = './tpl/css/article.css';
	$css_list[0]['url'][] = './tpl/css/note.css';
?>
<!--{template inc/header_n}-->

<div class="main_warp">
    <div class="i_inner">
        <p style="text-align:left;">当前位置：<a href="/product.php?action=list&cate={$parentcate['cate_id']}">{$parentcate['cate_name']}</a> > <a href="/product.php?action=list&cate={$currcate['cate_id']}">{$currcate['cate_name']}</a></p>
        
        <div class="product_view">

            <div class="i_lefter">
                <div class="i_title">
                    <b>¥ {$share_detail['price']}</b>
                    <h3>{$share_detail['title']}
                        <a href="javascript:;" onclick="addtocart({$share_detail['id']})" class="j_btn">加入对比</a>
                        <a href="{$share_detail['redirecturl']}" target="_blank" class="j_btn">去购买</a></h3>
                    <br class="g_clear" />
                </div>

                <div class="i_content">
                    <p><a href="{$share_detail['redirecturl']}" target="_blank"><img src="{$share_detail['img']}"/></a></p>
                    {$share_detail['content']}
                </div>




            </div>

            <div class="i_righter">
                <div class="i_rightitle">评论最多</div>
                <div class="i_hot_list">
                    <ul>
                        {if !empty($products_comment)}
                        <!--{loop $products_comment $v}-->
                        <li>
                            <a href="/product.php?action=show&id={$v['id']}"><img src="{$v['img']}" /></a>
                            <div class="j_info">
                                <p class="k_tt"><a href="/product.php?action=show&id={$v['id']}">{$v['title']}</a></p>
                                <!--<p class="k_name"><a href="#">陈昌业</a></p>-->
                            </div>
                            <br class="g_clear" />
                        </li>
                        <!--{/loop}-->
                        {/if}
                    </ul>
                </div>
                
                <div class="i_rightitle">转发最多</div>
                <div class="i_hot_list">
                    <ul>
                        {if !empty($products_share)}
                        <!--{loop $products_share $v}-->
                        <li>
                            <a href="/product.php?action=show&id={$v['id']}"><img src="{$v['img']}" /></a>
                            <div class="j_info">
                                <p class="k_tt"><a href="/product.php?action=show&id={$v['id']}">{$v['title']}</a></p>
                                <!--<p class="k_name"><a href="#">陈昌业</a></p>-->
                            </div>
                            <br class="g_clear" />
                        </li>
                        <!--{/loop}-->
                        {/if}
                    </ul>
                </div>
            
            </div>

            <div class="g_clear"></div>

        </div>

        <div class="i_notice">
            <div class="j_title">公告栏</div>
            <div class="j_list">
                <ul>
             <li><a href="#"><b>婚礼款项建设银行冻结监管</b></a></li>
             <li><a href="#"><b>真实新人评价（新人凭婚宴发票进行评价）</b></a></li>
             <li><a href="#"><b>没有中间商赚差价</b></a></li>
                </ul>
            </div>
        </div>
    </div>

</div>

<!--{template inc/footer}-->
<script type="text/javascript" src="/public/js/TextAreaTip.js"></script>
<script type="text/javascript">
function UpdateUserFollow(obj,result)
{
	if(result.status == 1)
	{
		$(obj).before('<img class="fo_ok" src="./tpl/images/add_ok_03.png">');
		$(obj).remove();
	}
}

jQuery(function(){
	CommentInit();
});

function CommentInit()
{
	$(".note_comment .pagination a").click(function(){
		var page = $(this).attr('page');
		$.Get_Product_Comment("{$share_detail['id']}",page,'#SHARE_COMMENT_LIST_BOX',CommentInit);
		return false;
	});
}

function myshare() {
	if(!$.Check_Login())
		return false;

    var module = 'share';
    var action =  'save';
	var url = SITE_PATH + 'services/service.php?m=' + module + '&a=' + action;
	$.ajax({
		url: url,
		type: "POST",
		data: {
		    'module' : module,
		    'action' : action,
		    'content' : '{$share_detail['title']}',
		    'albumid' : 0,
		    'mytype' : 'product',
		    'productid' : {$share_detail['id']},
		    'pic' : '{$share_detail['img']}'
		},
		cache:false,
		dataType: "json",
		success:function(result){
			if(result.status == 1)
			{
                alert('分享成功！');
			}
			else
			{
				if(result.error_msg)
					alert(result.error_msg);
				else
					alert(LANG.pub_share_tip1);
			}
		},
		error:function(){
			alert(LANG.pub_share_tip1);
		}
	});
}

function addtocart(id) {
    var ids = $.cookie('pids');
    if(ids) {
        idsarr = ids.split(',');
        var b = false;
        for(var i = 0; i < idsarr.length; i++) {
            if(idsarr[i] == id) {
                b = true;
                break;
            }
        }
        if(!b) {
            ids += ',' + id;
        }
    } else {
        ids = id;
    }
    $.cookie('pids', ids, {expires:7});
    alert('加入比价车成功！');
}

var ttTips=textAreaTips("content");
ttTips.start();
ttTips.bind();
</script>